#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

int main()
{
    char f[1000],tmp[26];
    char (*p)[26];
    char (*q)[26];
    int i,j,num,sp;
    while(gets(f)!=NULL)
    {
        q=p=(char (*)[26])calloc(20,sizeof(char [26]));
        i=j=num=sp=0;
        while(f[i]!='\0')
        {
            if(f[i]!=' ')
            {
                sp=1;
                tmp[j]=f[i];
                j++;
            }
            else
            {
                tmp[j]='\0';
                j=0;
                if(sp==1)
                {
                    if(num>16)
                        p=q=realloc(p,(num+num*0.5)*sizeof(char[26]));
                    strcpy(p[num],tmp);
                    num++;
                }
                sp=0;
            }
            i++;
        }
        if(f[i-1]!=' ')
        {
            tmp[j]='\0';
            if(num>16)
                p=q=realloc(p,(num+num*0.5)*sizeof(char[26]));
            strcpy(p[num],tmp);
            num++;
        }
        printf("%d\n",num);
        for(i=0;i<num;i++)
            printf("%s\n",q[i]);
    }
    return 0;
}